derivable traits and trait inheritance

trait A {}
trait B: A {}
struct S;
impl B for S {}
impl A for S {} // separately implement both B and A

let x: &B = &S;